﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;

public class test2 : MonoBehaviour {

	public VideoPlayer vp = null;

	// Use this for initialization
	void Start () {
		vp.url = Application.persistentDataPath + "/01.mp4";
		Debug.Log (vp.url);
		vp.prepareCompleted += pred;
		vp.Prepare ();
	}

	void pred(VideoPlayer vpp)
	{
		vpp.Play ();


	}
	
	// Update is called once per frame
	void Update () {
		
	}

	public void Play()
	{
		
		vp.Play ();
	}

	public void Puase()
	{
		vp.Pause ();
	}

	public void Stop()
	{
		vp.Stop ();
	}
}
